<template>
  <div class="gengduoxx">
    <div class="head">更多公告</div>
    <div class="item" v-for="(item,index) in gonggaolist" :key="index" @click="todetals(item.id)">
      <div class="title">{{item.title}}</div>
      <div class="time">{{item.created_at}}</div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      gonggaolist: ''
    };
  },
  methods: {
     getgonggao() {
      this.$get(
        // method: "get",
        "media/users/notice_list",
        {
          uqid: localStorage.getItem("uqid"),
          type:1,
          page:'1',
          limit:'100'
        }
      ).then(response => {
        console.log(response);
        if (response.error == "0") {
          // this.xiaoxilist = response.data;
           this.gonggaolist=response.data;

        } else {
          this.$message({
            showClose: true,
            message: response.message,
            type: "error"
          });
        }
      });
    },
    todetals(id){
      this.$router.push({ path: "/index/gg_yd_details", query: {type:'gg',id:id} });
      this.$store.state.mianbaoxie=['乐讯号','公告详情',]
    }
  },
  mounted () {
    if(!localStorage.getItem('uqid')){
      this.$router.push({ path: "/login", query: {  } });
      return
    }
    this.$store.state.mianbaoxie=['乐讯号','主页','更多公告']
    this.getgonggao();
  },
};
</script>

<style  scoped>
.time {
  font-size: 14px;

  color: rgba(172, 172, 172, 1);
}

.title {
  width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item {
  font-size: 16px;
  color: rgba(51, 51, 51, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
  padding-top: 14px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(231, 237, 252, 1);
}
.head {
  font-size: 18px;
  color: rgba(51, 51, 51, 1);
}
.gengduoxx {
  height: calc(100% - 118px);
  background: rgba(255, 255, 255, 1);
  padding: 26px;
  box-sizing: border-box;
  overflow: hidden;
  overflow-y: scroll;
}
.gengduoxx::-webkit-scrollbar{
    display: none;
}
</style>